/*
 * $Id: ExitAction.java 23 2009-03-31 23:37:36Z aaron.day $
 */
package org.crazydays.gameplan.swing;


import java.awt.event.ActionEvent;

import org.crazydays.gameplan.GamePlan;

/**
 * ExitAction
 */
public class ExitAction
        extends AbstractActionWrapper
{
	/** serial version uid */
	public final static long serialVersionUID = "$Id".hashCode();

	/** game plan */
	protected GamePlan gamePlan;

	/**
	 * ExitAction constructor.
	 * 
	 * @param gamePlan GamePlan
	 */
	public ExitAction(GamePlan gamePlan)
	{
		super("Exit");
		setGamePlan(gamePlan);
	}

	/**
	 * Set game plan.
	 * 
	 * @param gamePlan GamePlan
	 */
	public void setGamePlan(GamePlan gamePlan)
	{
		this.gamePlan = gamePlan;
	}

	/**
	 * Get game plan.
	 * 
	 * @return GamePlan
	 */
	public GamePlan getGamePlan()
	{
		return gamePlan;
	}

	/**
	 * Close application.
	 * 
	 * @param event Event
	 * @see java.awt.event.ActionListener#actionPerformed(ActionEvent)
	 */
	public void actionPerformed(ActionEvent event)
	{
		System.exit(0);
	}

}
